package cz.semjob.learning.data;

import java.util.ArrayList;
import java.util.List;

import cz.semjob.document.annotation.metadata.Relation;
import cz.semjob.learning.data.attribute.AInstanceAttribute;
import cz.semjob.learning.instances.LabeledRelationInstance;

/**
 * @author ivivivi
 * 
 */
public class RelationDataSet implements IDataSet {

	private String name;

	private List<AInstanceAttribute> attributesList;

	private List<LabeledRelationInstance> positiveInstances;
	// private List<LabeledRelationInstance> negativeInstances;

	private List<Relation> relations;

	// private Set<String> relations;

	public RelationDataSet(String name, List<Relation> relations) {
		super();
		this.name = name;
		this.positiveInstances = new ArrayList<LabeledRelationInstance>();
		this.relations = relations;
		// this.negativeInstances = new ArrayList<LabeledRelationInstance>();
		// this.relations = new HashSet<String>();
	}

	public void addPositiveInstances(List<LabeledRelationInstance> instances,
			Relation relation) {
		positiveInstances.addAll(instances);
		// relations.add(relation.getName());
	}

	// public void addNegativeInstances(List<LabeledRelationInstance> instances)
	// {
	// negativeInstances.addAll(instances);
	// }

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public List<AInstanceAttribute> getAttributesList() {
		return attributesList;
	}

	public void setAttributesList(List<AInstanceAttribute> attributesList) {
		this.attributesList = attributesList;
	}

	public List<LabeledRelationInstance> getPositiveInstances() {
		return positiveInstances;
	}

	// public List<LabeledRelationInstance> getNegativeInstances() {
	// return negativeInstances;
	// }

	public int getPositiveInstancesSize() {
		return this.positiveInstances.size();
	}

	// public int getNegativeInstancesSize() {
	// return this.negativeInstances.size();
	// }

	public List<Relation> getRelations() {
		return relations;
	}

	public AInstanceAttribute getAttributeForName(String name) {
		// TODO Auto-generated method stub
		return null;
	}

}
